<?php
/**
 * Enter description here ...
 * @author Micou13630
 *
 */
class DynamicForm extends Canvas implements IRenderable {

	protected $action;
	protected $encoding;
	protected $method;
	protected $target;
	protected $canSubmit;
	protected $saveOnEnter;
	
	protected $saveOperationType;

	protected $autoFetchData;
	protected $autoFetchTextMatchStyle;
	protected $implicitSave;
	protected $implicitSaveDelay;

	protected $initialCriteria;

	protected $autoFocus;
	protected $canFocus;

	protected $cancelParamName;
	protected $cancelParamValue;

	protected $cellBorder;
	protected $cellPadding;
	protected $colWidths;
	protected $fixedColWidths;
	protected $itemLayout;
	protected $minColWidth;
	protected $numCols;

	protected $titleAlign;
	protected $titleOrientation;
	protected $titlePrefix;
	protected $titleSuffix;
	protected $titleWidth;

	protected $itemHoverAlign;
	protected $itemHoverDelay;
	protected $itemHoverHeight;
	protected $itemHoverOpacity;
	protected $itemHoverStyle;
	protected $itemHoverVAlign;
	protected $itemHoverWidth;

	protected $disableValidation;
	protected $rejectInvalidValueOnChange;
	protected $requiredMessage;
	protected $requiredRightTitlePrefix;
	protected $requiredRightTitleSuffix;
	protected $requiredTitlePrefix;
	protected $requiredTitleSuffix;
	protected $validateOnChange;
	protected $validateOnExit;

	protected $errors;
	protected $errorOrientation;
	protected $formSubmitFailedWarning;
	protected $showErrorIcons;
	protected $showErrorStyle;
	protected $showErrorText;
	protected $showInlineErrors;
	protected $showTitlesWithErrorMessages;
	protected $stopOnError;
	protected $unknownErrorMessage;

	protected $fields;
	protected $hiliteRequiredFields;
	protected $values;

	protected $selectOnFocus;

	protected $wrapItemTitles;
	
	protected $dataSource;

	/**
	 * Enter description here ...
	 * @param unknown_type $id
	 */
	public function DynamicForm ($id) {
		parent::Canvas($id);

		$this->fields = array();
	}

	/**
	 * Enter description here ...
	 * @param unknown_type $f
	 */
	public function addField($f) {
		$this->fields[] = $f;
	}
	
	/**
	 * Enter description here ...
	 * @param unknown_type $f
	 */
	public function addItem($f) {
		$this->fields[] = $f;
	}

	/**
	 * Implementation de object
	 * @see IRenderable::object()
	 */
	public function object() {
		return get_class($this);
	}

	/**
	 * Implementation de properties
	 * @see IRenderable::properties()
	 */
	public function properties() {
		return parent::getProp($this);
	}

	/**
	 * Implementation de scLog
	 * @see IRenderable::scLog()
	 */
	public function scLog() {
		ScCollectionLog::getInstance()->addSc(new ScLog($this->object(), get_object_vars($this)));
	}
	
	/**
	 * Implementation de render
	 * @see IScreen::render()
	 */
	public function render() {
		$this->scLog();
		return "isc.".$this->object().".create({".$this->properties()."})";
	}

}
?>
